package com.miyake.loveviewweb.client.plugin;

import java.util.ArrayList;
import java.util.List;

import com.miyake.loveviewweb.shared.model.PluginModel;

public class PluginModelEx {
    private boolean selected = false;
    private PluginModel pluginModel;
    public PluginModelEx(PluginModel p, boolean b) {
        pluginModel = p;
        setSelected(b);
    }

    /**
     * @return the pluginModel
     */
    public PluginModel getPluginModel() {
        return pluginModel;
    }
    /**
     * @param pluginModel the pluginModel to set
     */
    public void setPluginModel(PluginModel pluginModel) {
        this.pluginModel = pluginModel;
    }
    
    public static List<PluginModelEx> getPluginModelEx(List<PluginModel> pluginModels) {
        List<PluginModelEx> list = new ArrayList<PluginModelEx>();
        for (PluginModel p : pluginModels) {
            list.add(new PluginModelEx(p, false));
        }
        return list;
    }

    /**
     * @return the selected
     */
    public boolean isSelected() {
        return selected;
    }

    /**
     * @param selected the selected to set
     */
    public void setSelected(boolean selected) {
        this.selected = selected;
    }
}
